<?php
	// 创建数据库连接
	$servername = "localhost";
	$username = "root";
	$password = "root";

	//数据库的名字
	$dbname = "wb";

	// 创建连接
	$conn = new mysqli($servername, $username, $password, $dbname);

	//保证查询出来的中文不会出现乱码
	mysqli_set_charset($conn, "utf8");
	// 检测连接
	if ($conn->connect_error) {
	    die("连接失败: " . $conn->connect_error);
	} 
?>